package 对称之美;

import java.util.Arrays;
import java.util.Random;
import java.util.Scanner;

// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main {
    static int N = 110, n;
    static String[] str = new String[N];
    static boolean[][] st = new boolean[N][26];

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        int T = in.nextInt();
        while (T-- > 0) {
            n = in.nextInt();
            for (int i = 1; i <= n; i++) {
                Arrays.fill(st[i], false);
            }
            for (int i = 1; i <= n; i++) {
                str[i] = in.next();
                for (int j = 0; j < str[i].length(); j++) {
                    st[i][str[i].charAt(j) - 'a'] = true;
                }
            }
            if (dfs(1, n)) {
                System.out.println("Yes");
            } else {
                System.out.println("No");
            }

        }
    }

    private static boolean dfs(int start, int end) {
        if (start >= end) {
            return true;
        }
        for (int i = 0; i < str[start].length(); i++) {
            if (st[end][str[start].charAt(i) - 'a']) {
                if (dfs(start + 1, end - 1)) {
                    return true;
                } else {
                    return false;
                }
            }
        }
        return false;
    }
}
